package com.ruoyi.deeplearn.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.deeplearn.mapper.DeepForecastMapper;
import com.ruoyi.deeplearn.domain.DeepForecast;
import com.ruoyi.deeplearn.service.IDeepForecastService;

/**
 * 模型预测Service业务层处理
 * 
 * @author rww
 * @date 2024-09-14
 */
@Service
public class DeepForecastServiceImpl implements IDeepForecastService 
{
    @Autowired
    private DeepForecastMapper deepForecastMapper;

    /**
     * 查询模型预测
     * 
     * @param id 模型预测主键
     * @return 模型预测
     */
    @Override
    public DeepForecast selectDeepForecastById(Long id)
    {
        return deepForecastMapper.selectDeepForecastById(id);
    }

    /**
     * 查询模型预测列表
     * 
     * @param deepForecast 模型预测
     * @return 模型预测
     */
    @Override
    public List<DeepForecast> selectDeepForecastList(DeepForecast deepForecast)
    {
        return deepForecastMapper.selectDeepForecastList(deepForecast);
    }

    /**
     * 新增模型预测
     * 
     * @param deepForecast 模型预测
     * @return 结果
     */
    @Override
    public int insertDeepForecast(DeepForecast deepForecast)
    {
        deepForecast.setCreateTime(DateUtils.getNowDate());
        return deepForecastMapper.insertDeepForecast(deepForecast);
    }

    /**
     * 修改模型预测
     * 
     * @param deepForecast 模型预测
     * @return 结果
     */
    @Override
    public int updateDeepForecast(DeepForecast deepForecast)
    {
        deepForecast.setUpdateTime(DateUtils.getNowDate());
        return deepForecastMapper.updateDeepForecast(deepForecast);
    }

    /**
     * 批量删除模型预测
     * 
     * @param ids 需要删除的模型预测主键
     * @return 结果
     */
    @Override
    public int deleteDeepForecastByIds(Long[] ids)
    {
        return deepForecastMapper.deleteDeepForecastByIds(ids);
    }

    /**
     * 删除模型预测信息
     * 
     * @param id 模型预测主键
     * @return 结果
     */
    @Override
    public int deleteDeepForecastById(Long id)
    {
        return deepForecastMapper.deleteDeepForecastById(id);
    }
}
